namespace EF6WithSqlDemo.Migrations
{
    using Model;
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;

    /// <summary>
    /// Configuration For BloggingContext
    /// </summary>
    internal sealed class Configuration : DbMigrationsConfiguration<BloggingContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;

            AutomaticMigrationDataLossAllowed = true;
        }

        protected override void Seed(BloggingContext context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.


            //context.Blogs.AddOrUpdate(
            //     new Blog { Url = "aaa" },
            //     new Blog { Url = "bbb" },
            //     new Blog { Url = "ccc" }
            //);

            ////
            //context.Posts.AddOrUpdate(
            //        new Post { Content = "111", Title = "t1", BlogId = 1 },
            //        new Post { Content = "222", Title = "t2", BlogId = 2 }
            //    );
        }
    }
}
